package com.qiangesoft.email.controller;

import com.qiangesoft.email.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * email 控制器
 *
 * @author qiangesoft
 * @date 2024-04-10
 */
@RestController
@RequestMapping("/email")
public class EmailController {

    @Autowired
    private EmailService emailService;

    @GetMapping("/send")
    public void sendMail() {
        emailService.sendSimpleMail("15883968757@163.com", "测试一下", "内容：第一封html邮件");
        emailService.sendHtmlMail("15883968757@163.com", "测试一下", "<h1>内容：第一封html邮件</h1>");
        emailService.sendAttachmentsMail("15883968757@163.com", "测试一下", "内容：第一封html邮件", "E:\\Desktop\\LOGO.jpg");
    }

}
